#ifndef __BSP_ARRAY_H__
#define __BSP_ARRAY_H__


#include <stdint.h>

#define Array_True	(1)
#define Array_False	(0)

typedef struct _tagArrayObject
{
	uint32_t ulIndex;
	uint32_t ulMaxSize;
	void*		 vpArray;
}ArrayObject_T;

uint8_t ArrayObjectCreate(ArrayObject_T *_tArray, uint32_t _ulSize);
void ArrayObjectInit(ArrayObject_T *_tArray, uint8_t *_ucBuff, uint32_t _ulSize);

uint32_t ArrayOjectGetSize(ArrayObject_T *_tArray);
uint32_t ArrayOjectGetMaxSize(ArrayObject_T *_tArray);
void* ArrayOjectGetPtr(ArrayObject_T *_tArray);

uint32_t ArrayObjectAdd(ArrayObject_T *_tArray, void *_vpBuff, uint32_t _ulSize);
uint32_t ArrayObjectAddForce(ArrayObject_T *_tArray, void *_vpBuff, uint32_t _ulSize);
uint32_t ArrayObjectOut(ArrayObject_T *_tArray, uint8_t *ucArray);

void ArrayObjectClear(ArrayObject_T *_tArray);

#endif

